package sf.md.create.factory.abstractt;

public class FactoryManagerHandler implements FactoryManager {
    @Override
    public FactoryAbstracy getFactory(FactoryEnum factoryEnum) throws Exception {
        switch (factoryEnum){
            case CARFACOTYR:
                return  new CarFactory();
            case APPLEFACTORY:
                return new AppleFactory();
            default:
                throw new Exception("不存在当前工厂类型");

        }

    }
}
